import { TypeAddUserAPI, TypeEditUserAPI, TypeSearchInfo, TypeUserListAPI, TypeUserListData } from '../type/api'
import request from '../util/request'

//获取用户列表
export function getUserListAPI(params?: TypeSearchInfo) {
  return request.get<TypeUserListAPI>('/users/list', params || {})
}

//添加用户
export function addUserListAPI(params: TypeAddUserAPI) {
  return request.post('/users/create', params)
}
//编辑用户
export function editUserListAPI(params: TypeEditUserAPI) {
  return request.post('/users/edit', params)
}
//删除用户
export function deleteUserListAPI(params: string) {
  return request.delete('/users/delete', params)
}